import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/admin/login/loginHandel',
    method: 'post',
    data
  })
}

export function getInfo(data) {
  return request({
    url: '/admin/index/getList',
    method: 'post',
    data
  })
}

// export function logout() {
//   return request({
//     url: '/vue-element-admin/user/logout',
//     method: 'post'
//   })
// }

/**
 * 修改密码
 * @param {y_password,password} token 
 * @returns 
 */
export function password(data) {
  return request({
    url: '/admin/admin/upPsd',
    method: 'post',
    data
  })
}

/**
 * 首页数据
 * @param {} 
 * @returns 
 */
export function dashboardInfo(data) {
  return request({
    url: '/admin/index/statistics',
    method: 'post',
    data
  })
}